<template>
    <vab-icon
        :icon="collapse ? 'menu-unfold-fill' : 'menu-fold-fill'"
        class="fold-unfold"
        @click="toggleCollapse"
    />
</template>

<script lang="ts">
import Vue from "vue";
import {SettingMutationEnum, SettingsGetterEnum} from "@/store/enum/store.enum";
import Component from "vue-class-component";

@Component({})
export default class JmFold extends Vue {
    private toggleCollapse() {
        this.$store.commit(SettingMutationEnum.toggleCollapse)
    };

    get collapse() {
        return this.$store.getters[SettingsGetterEnum.collapse];
    };
}
</script>

<style lang="scss" scoped>
.fold-unfold {
    color: $base-color-gray;
    cursor: pointer;
    font-size: 22px;
}
</style>
